home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / docs / howto / scvs.txt < prev    next >
Encoding:
Text File  |  1992-12-14  |  15.5 KB  |  463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                       SSCCVVSS CChheeaatt SShheeeett
  9.  
  10.                       November 3, 1991
  11.  
  12.  
  13.      The SCVS Cheat Sheet explains some of the standard uses
  14. of  ssccvvss.   If  you want to do something that is not covered
  15. here you should refer to the man pages for  ssccvvss,  ccvvss,  and
  16. rrccss.   SSccvvss  manages  source directory trees called modules.
  17. SSccvvss modules for the kernel correspond to what we've  tradi-
  18. tionally  called  modules,  e.g. net, timer, mach, etc.  The
  19. "master" copy of the modules is stored  in  the  repository,
  20. which   is   a   directory  tree  of  RCS  files  rooted  at
  21. /sprite/src/kernel/Cvsroot.  In order to modify  the  source
  22. for a module you must first get your own copy of the module.
  23. Make your changes in your copy, and when you  are  satisfied
  24. with  them  commit  your  changes  to  the repository.  Your
  25. changes are not applied to the repository until  you  commit
  26. them,  at which time they become the "latest" version of the
  27. sources.  Throughout this cheat sheet the term "latest  ver-
  28. sion"  refers  to  the current version of the sources in the
  29. repository.
  30.  
  31.  
  32. HHooww ddoo II ggeett aa ccooppyy ooff aa mmoodduullee??
  33.  
  34.      Copies of kernel modules are usually kept  in  your
  35.      kernel                build               directory
  36.      (/sprite/src/kernel/username))..  IInn  tthhiiss  ddiirreeccttoorryy
  37.      ttyyppee  ssccvvss ccoo module..  AA ssuubbddiirreeccttoorryy ccaalllleedd module
  38.      wwiillll bbee ccrreeaatteedd,, aanndd iitt wwiillll bbee ppooppuullaatteedd wwiitthh  tthhee
  39.      ccuurrrreenntt  vveerrssiioonn  ooff  tthhee  mmoodduullee.. YYoouu wwiillll bbee ttoolldd
  40.      aabboouutt ootthheerr uusseerrss tthhaatt hhaavvee aa ccooppyy  ooff  tthhee  mmoodduullee
  41.      cchheecckkeedd  oouutt,,  iinncclluuddiinngg aannyy ootthheerr ccooppiieess yyoouu mmiigghhtt
  42.      hhaavvee..  YYoouu mmaayy wwaanntt ttoo cchheecckk wwiitthh tthheessee  ppeeooppllee  ttoo
  43.      mmaakkee ssuurree tthhaatt yyoouurr cchhaannggeess wwiillll bbee ccoommppaattiibbllee..  IIff
  44.      yyoouu ddoonn''tt iinntteenndd ttoo ccoommmmiitt yyoouurr cchhaannggeess ttoo tthhee  rree--
  45.      ppoossiittoorryy  tthheenn yyoouu sshhoouulldd uussee tthhee --ii ooppttiioonn ssoo tthhaatt
  46.      ootthheerr uusseerrss aarree nnoott ttoolldd aabboouutt yyoouurr ccooppyy..
  47.  
  48.      AAfftteerr tthhee cchheecckkoouutt iiss ccoommpplleettee yyoouu nneeeedd ttoo rruunn mmkkmmff
  49.      iinn yyoouurr ccooppyy ttoo ccrreeaattee aa MMaakkeeffiillee,, ddeeppeennddeenncciieess..mmkk,,
  50.      eettcc..
  51.  
  52.      IItt iiss ookk ttoo rree--cchheecckkoouutt aa mmoodduullee iiff yyoouu cchheecckkeedd  iitt
  53.      oouutt bbeeffoorree aanndd ssttiillll hhaavvee tthhee ssoouurrccee ttrreeee..
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                              11
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. HHooww ddoo II ggeett iinnffoorrmmaattiioonn aabboouutt tthhee ssttaattuuss ooff mmyy ccooppyy  ooff
  76.      aa mmoodduullee??
  77.  
  78.      Once you have a copy of a module you may want  some
  79.      information  about  the  files  in  your copy, like
  80.      which ones you've modified and which ones are  out-
  81.      of-date  with  the  latest  version. ssccvvss iinnffoo will
  82.      tell you what you want to know.   Here's  what  its
  83.      output means:
  84.  
  85.          UU file                                                                                                                    Your copy of file needs to be updated.
  86.          MM file                                                                                                                             You've modified file.
  87.          CC file                                                                                                               You've modified file, and it is also out-of-date.
  88.          AA file                                                                                                                              You've added file.
  89.          RR file                                                                                                                             You've removed file.
  90.          DD file                                                                                                                  Somebody deleted file from the repository.
  91.  
  92.  
  93.  
  94.  
  95.  
  96. WWhhaatt iiff II wwaanntt mmoorree iinnffoorrmmaattiioonn aabboouutt mmyy ccooppyy ooff aa ffiillee??
  97.  
  98.      The command ssccvvss ssttaattuuss file will give you RCS  in-
  99.      formation about the your copy of a file and the la-
  100.      test version of the file.  Here is some sample out-
  101.      put for the file timerInt.h.
  102.  
  103.          File:                                                                                                                                   timerInt.h
  104.          From:                                                                                                                                       9.8                                                                                                                        Fri Sep 13 15:04:52 1991 timerInt.h
  105.          RCS:                                                                                                                                        9.9                                                                                                               /sprite/src/kernel/Cvsroot/kernel/timer/timerInt.h,v
  106.  
  107.  
  108.      The  From:  line  tells  you  that  your  copy   of
  109.      timerInt.h  came from RCS version 9.8 of that file,
  110.      and that you created the copy on Friday,  September
  111.      13, 1991 at 15:04:52.  The RCS: line tells you that
  112.      the latest RCS version of the file is 9.9,  and  it
  113.      gives  you  the full path to the RCS file, not that
  114.      you would ever need it.
  115.  
  116.  
  117.  
  118.  
  119. HHooww ddoo II ggeett tthhee RRCCSS lloogg ffoorr mmyy ccooppyy ooff aa ffiillee??
  120.  
  121.      SSccvvss lloogg file will print out the RCS  log  for  the
  122.      file.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                              22
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. HHooww ddoo II rruunn ddiiffff oonn mmyy ccooppyy ooff aa ffiillee??
  142.  
  143.      SSccvvss ddiiffff file will do a rrccssddiiffff between your  copy
  144.      of  a  file and the version from which it came.  If
  145.      you want to do a diff between your version and  the
  146.      latest  version  you  should  do ssccvvss ddiiffff --RR file.
  147.      You can also do diffs between various  versions  of
  148.      the file by specifying the standard --rr options.
  149.  
  150.  
  151.  
  152.  
  153. HHooww ddoo II bbrriinngg mmyy ccooppyy uupp--ttoo--ddaattee wwiitthh tthhee  llaatteesstt  vveerr--
  154.      ssiioonn??
  155.  
  156.      If your copy of the sources is out-of-date with the
  157.      latest  version in the repository you can update it
  158.      using ssccvvss uuppddaattee [modules|subdirs|files].  If  you
  159.      don't specify any files it will update all files in
  160.      the current directory and its subdirectories,  oth-
  161.      erwise  it  will only update the files or subdirec-
  162.      tories you listed.  If ssccvvss uuppddaattee  discovers  that
  163.      you  have modified a file, and the copy of the file
  164.      in the repository has changed  also,  it  will  use
  165.      rrccssmmeerrggee  to  try  and  merge the changes.  If this
  166.      happens you will want to look at the file  to  make
  167.      sure  the changes were compatible.  The output from
  168.      ssccvvss uuppddaattee is similar to that of ssccvvss iinnffoo:
  169.  
  170.          UU file                                                                                                                        Your copy of file was updated.
  171.          MM file                                                                                                            Your changes to file were merged with the new version.
  172.          CC file                                                                                                          Your changes to file were merged, but there was a conflict.
  173.          AA file                                                                                                                              You've added file.
  174.          RR file                                                                                                                             You've removed file.
  175.          DD file                                                                                                                      file was deleted from your sources.
  176.  
  177.  
  178.      An "update" target has been added to  the  Makefile
  179.      for  kernel  modules  so that ppmmaakkee uuppddaattee will run
  180.      ssccvvss uuppddaattee.   This  is  useful  for  updating  all
  181.      modules in /sprite/src/kernel..
  182.  
  183.  
  184.  
  185.  
  186. WWhhoo eellssee hhaass aa ccooppyy ooff tthhee ssaammee mmoodduullee??
  187.  
  188.      When you check out a module you will be told  about
  189.      other  users  who  also  have a copy.  You can also
  190.      find out by doing ssccvvss wwhhoo [modules].
  191.  
  192.  
  193.  
  194.  
  195.                              33
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. WWhhaatt iiff II jjuusstt wwaanntt ttoo llooookk aatt tthhee ssoouurrcceess ffoorr aa mmoodduullee??
  208.  
  209.      Copies  of  all  kernel   modules   are   kept   in
  210.      /sprite/src/kernel..   TThheessee ccooppiieess aarree rreeaadd--oonnllyy ssoo
  211.      ddoonn''tt ttrryy ttoo mmooddiiffyy tthheemm.. TThheessee ccooppiieess ccaann bbee  uusseedd
  212.      ffoorr  bbrroowwssiinngg,,  aass  wweellll aass ffoorr bbuuiillddiinngg tthhee oobbjjeecctt
  213.      ffiilleess tthhaatt aarree uusseedd ttoo pprroodduuccee ooffffiicciiaall kkeerrnneellss..
  214.  
  215.  
  216.  
  217.  
  218. HHooww ddoo II aadddd aa nneeww ffiillee ttoo aa mmoodduullee??
  219.  
  220.      SSccvvss only deals with files it knows about. If  ssccvvss
  221.      hasn't been told about a file it will be ignored by
  222.      any ssccvvss commands.  To  add  a  file  to  a  module
  223.      create  the  file  in your copy of the module, then
  224.      type ssccvvss aadddd file. The file must exist in order to
  225.      be  added.  The file will not be added to the repo-
  226.      sitory until you ccoommmmiitt your changes.
  227.  
  228.  
  229.  
  230.  
  231. HHooww ddoo II aadddd aa nneeww ssuubbddiirreeccttoorryy ttoo aa mmoodduullee??
  232.  
  233.      Subdirectories are added using  ssccvvss  aadddd  in  your
  234.      copy  of  a module just like files, except that you
  235.      will be asked if you really want to  do  this.   If
  236.      the  subdirectory  contains  any files they must be
  237.      added individually (aadddd is not recursive).
  238.  
  239.  
  240.  
  241.  
  242. HHooww ddoo II rreemmoovvee aa ffiillee ffrroomm aa mmoodduullee??
  243.  
  244.      In your copy of a module type ssccvvss rreemmoovvee  file  to
  245.      remove a file.  If the file still exists it will be
  246.      deleted.  The file will not be removed from the re-
  247.      pository until you ccoommmmiitt your changes.
  248.  
  249.  
  250.  
  251.  
  252. OOooppss.. II jjuusstt aacccciiddeennttllyy rreemmoovveedd aa ffiillee ffrroomm mmyy ccooppyy!!
  253.  
  254.      If you haven't ccoommmmiittted your changes yet, you  can
  255.      retrieve  the  file  using  ssccvvss aadddd file.  It will
  256.      give you the version of  the  file  you  originally
  257.      checked out.
  258.  
  259.  
  260.  
  261.                              44
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273. HHooww ddoo II aadddd aa nneeww mmoodduullee ttoo tthhee rreeppoossiittoorryy??
  274.  
  275.      Don't try this at home.  Send mail to jhh@sprite.
  276.  
  277.  
  278.  
  279.  
  280. HHooww ddoo II uunnddoo mmyy cchhaannggeess ttoo aa ffiillee??
  281.  
  282.      Currently the best way to do this is  to  use  ssccvvss
  283.      rreemmoovvee  file,  followed by ssccvvss aadddd file. This will
  284.      give you the version of  the  file  you  originally
  285.      checked out.
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                              55
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339. HHooww ddoo II ccoommmmiitt mmyy cchhaannggeess ttoo aa mmoodduullee??
  340.  
  341.      After you have made your changes to  a  module  you
  342.      need to commit them into the repository.  There are
  343.      several steps in committing your changes:
  344.  
  345.  (1)   Verify that your copy is up-to-date and it  works
  346.        properly.
  347.  
  348.  (2)   Lock the module(s)  using  ssccvvss  lloocckk  [modules].
  349.        Locking  the  modules  prevents  other users from
  350.        committing changes at the same time.
  351.  
  352.  (3)   Use ssccvvss ccoommmmiitt [files] (ccoommmmiitt is usually abbre-
  353.        viated  as  ccii) to commit your changes. Each ssccvvss
  354.        ccii command allows you to specify one log  message
  355.        (either using --mm or by bringing up an editor). If
  356.        you want all the files you modified to  have  the
  357.        same  message  use  ssccvvss  ccii without any options,
  358.        otherwise you must run ssccvvss ccii once for each mes-
  359.        sage and corresponding list of files.
  360.  
  361.  (4)   As you  commit  your  changes  the  copy  of  the
  362.        sources  in /sprite/src/kernel/module will be up-
  363.        dated.  These copies are used to  build  kernels,
  364.        so you need to recompile any source files you may
  365.        have    changed.     To    do    this    cd    to
  366.        /sprite/src/kernel/module.  Run mmkkmmff, followed by
  367.        ppmmaakkee.  Make sure the resulting object files pro-
  368.        duce  a  working kernel.  Then run ppmmaakkee iinnssttaallll.
  369.        Be sure to compile and install  for  all  machine
  370.        types.  If the sources don't build a working ker-
  371.        nel then you may have forgotten to aadddd or  rreemmoovvee
  372.        a file.
  373.  
  374.  (5)   Unlock the modules using ssccvvss  uunnlloocckk  [modules].
  375.        Don't forget to do this.
  376.  
  377.  
  378.  
  379.  
  380. WWhhaatt ddoo II ddoo wwhheenn II''mm ddoonnee wwiitthh mmyy ccooppyy??
  381.  
  382.      ssccvvss ddoonnee lets ssccvvss know that  you  are  done  with
  383.      your  copy,  so  that other users will no longer be
  384.      told about it.  The  --dd  option  will  delete  your
  385.      copy.  Use the --dd option with care.  If you deleted
  386.      your copy using rrmm without running ssccvvss ddoonnee  first
  387.      then  ssccvvss  will  think you still have a copy.  You
  388.      set it straight  with  ssccvvss  ddoonnee  pathname,  where
  389.      pathname  is the full pathname of the copy you used
  390.      to have.
  391.  
  392.  
  393.                              66
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405. HHooww ddoo II uunnlloocckk aa lloocckkeedd mmoodduullee??
  406.  
  407.      If ssvvccss is killed unexpectedly it will leave  locks
  408.      on  any  modules it was processing at the time.  If
  409.      you have an unwanted lock on a module you  can  re-
  410.      move it with ssccvvss uunnlloocckk [modules].  If you want to
  411.      remove all locks on a module, even those  owned  by
  412.      other  people,  you  can  do so with ssccvvss uunnlloocckk --aa
  413.      [modules].
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                              77
  460.  
  461.  
  462.  
  463.